import java.sql.*;

public class ConnectionFactoryImpl extends ConnectionFactory{

	private String driver, url, username, password;
	
	public ConnectionFactoryImpl (String driver, String url, String username, String password){
		this.driver = driver;
		this.url = url;
		this.username = username;
		this.password = password;
	}
	
	public Connection getConnection(){
		try{
			Class.forName(driver);
			Connection conn = DriverManager.getConnection(url, username, password);
			
			return conn;
		}
	catch(SQLException e){
		
	}
	catch(ClassNotFoundException ex){

	}
	return null;
	}
	
}
